<?php
declare (strict_types = 1);
namespace app\user\logic\user;

use app\user\model\user\ThirdLogin as ThirdLoginModel;


/**
 * 三方登录
 */
class ThirdLogin extends ThirdLoginModel
{
    
    public function isUserBind($user_id = 0, $type = '')
    {
        if ( !$user_id ) return 0;

        $bind = $this->where('user_id', $user_id)->where('type', $type)->findOrEmpty();
        
        return $bind->isEmpty() ? 0 : 1;
    }
}
